<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>grid</title>
    <style>
      * {
        box-sizing: border-box;
      }
      body {
        padding: 0;
        margin: 0;
      }
      .container {
        text-align: center;
        display: grid;
        grid-template-rows: 60px 1fr 80px; /* 高度*/
        grid-template-columns: 200px 1fr 1fr; /* 宽度，1fr 自适应 */
        grid-template-areas: "header header header" "nav main aside" "footer footer footer"; /* 模块 */
        grid-gap: 10px 0; /* 间距  */
        height: 100vh; /* 100vh 全屏 - gap 20px */
      }
      header {
        grid-area: header; /* 名字 */
        background-color: aqua;
      }
      nav {
        grid-area: nav;
        background-color: antiquewhite;
      }
      main {
        grid-area: main;
        background-color: cadetblue;
      }
      aside {
        grid-area: aside;
        background-color: blueviolet;
      }
      footer {
        grid-area: footer;
        background-color: bisque;
      }
    </style>
  </head>
  <body>
    <div class="container">
      <header>header</header>
      <nav>nav</nav>
      <main>main</main>
      <aside>aside</aside>
      <footer>footer</footer>
    </div>
  </body>
</html>
